//配置路由相关信息
import VueRouter from 'vue-router'
import Vue from 'vue'

//安装插件
Vue.use(VueRouter)

//创建对象
const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/',
    component: () => import('@/components/home.vue'),
    children:[
      {
        path: '/index',
        name:"index",
        component: () => import('@/views/homePage/homePage.vue'),
        meta: {
          title: '首页'
        }
      },
      {
        path: '/center',
        name:"center",
        component: () => import('@/components/center.vue'),
        meta: {
          title: '个人中心'
        },
        children:[
          {
            path: '/concern',
            name:"concern",
            component: () => import('@/views/personalCenter/concern.vue'),
            meta: {
              title: '我的关注'
            }
          },
          {
            path: '/subscribe',
            name:"subscribe",
            component: () => import('@/views/personalCenter/subscribe.vue'),
            meta: {
              title: '我的预约'
            }
          },
          {
            path: '/safety',
            name:"safety",
            component: () => import('@/views/personalCenter/safety.vue'),
            meta: {
              title: '账号安全'
            }
          },
          {
            path: '/participate',
            name:"participate",
            component: () => import('@/views/personalCenter/participate.vue'),
            meta: {
              title: '我的参拍'
            }
          },
          {
            path: '/message',
            name:"message",
            component: () => import('@/views/personalCenter/message.vue'),
            meta: {
              title: '我的消息'
            }
          },
          {
            path: '/live',
            name:"live",
            component: () => import('@/views/personalCenter/live.vue'),
            meta: {
              title: '直播'
            }
          },
          {
            path: '/invoice',
            name:"invoice",
            component: () => import('@/views/personalCenter/invoice.vue'),
            meta: {
              title: '发票信息'
            }
          },
        ]
      },
      {
        path: '/lotType',
        name: "lotType",
        component: () => import('@/views/lotType/lotType.vue'),
        meta: {
          title: '标的物类型'
        }
      },
      {
        path: '/auctionList',
        name: "auctionList",
        component: () => import('@/views/auctionList/auctionList.vue'),
        meta: {
          title: '拍卖会'
        }
      },
      {
        path: '/lotList',
        name:"lotList",
        component: () => import('@/views/lotList/lotList.vue'),
        meta: {
          title: '标的列表'
        }
      },
      {
        path: '/carousel',
        name:"carousel",
        component: () => import('@/views/carousel/carousel.vue'),
        meta: {
          title: '轮播图'
        }
      },
      {
        path: '/notice',
        name:"notice",
        component: () => import('@/views/notice/notice.vue'),
        meta: {
          title: '拍卖公告'
        }
      },
      {
        path: '/rules',
        name:"rules",
        component: () => import('@/views/rules/rules.vue'),
        meta: {
          title: '规则'
        }
      },
      {
        path: '/lot',
        name:"lot",
        component: () => import('@/views/lot/lot.vue'),
        meta: {
          title: '标的详情'
        }
      },
      {
        path: '/investment',
        name:"investment",
        component: () => import('@/views/investment/investment.vue'),
        meta: {
          title: '资产招商'
        }
      },
      {
        path: '/cooperation',
        name:"cooperation",
        component: () => import('@/views/cooperation/cooperation.vue'),
        meta: {
          title: '合作机构'
        }
      },
      {
        path: '/assetAuction',
        name:"assetAuction",
        component: () => import('@/views/assetAuction/assetAuction.vue'),
        meta: {
          title: '资产拍卖登记'
        }
      },
      {
        path: '/noticeList',
        name:"noticeList",
        component: () => import('@/views/noticeList/noticeList.vue'),
        meta: {
          title: '拍卖公告'
        }
      },
    ]

  },
  {
    path: '/login',
    name:"login",
    component: () => import('@/components/login.vue'),
    meta: {
      title: '登录'
    }
  },
  {
    path: '/register',
    name:"register",
    component: () => import('@/components/register.vue'),
    meta: {
      title: '注册'
    }
  }

]

const router = new VueRouter({
  routes

})

export default router